using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace BankingLibrary
{
    public delegate void Log(string logData);

    public class AccountWithDelegate
    {
        private Log _logger { get;  set; }

       
     
        public void AddAuditLogger(Log logger)
        {
            _logger += logger;
        }
        public void Withdraw(int amount)
        {
            if (amount > 10000)
            {
                if (_logger != null)
                {
                    _logger.Invoke("More than 10000 withdrawn");
                }
            }
        }
    }


}
